package com.candy.entity;

import org.springframework.stereotype.Component;

@Component
public class User {
    private Integer id;//主键
    private String username;//用户名
    private String password;//密码
    private Integer age;
    private Double balance;
    private String address;

    public User() {
    }

    public User(Integer id, String username, String password, Integer age, Double balance, String address) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.age = age;
        this.balance = balance;
        this.address = address;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", age=" + age +
                ", balance=" + balance +
                ", address='" + address + '\'' +
                '}';
    }
}
